﻿@{
    Layout = "~/Views/Shared/_Root.cshtml";
}

@{
    //current category ID
    int currentCategoryId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("category", StringComparison.InvariantCultureIgnoreCase))
    {
        currentCategoryId = Convert.ToInt32(Url.RequestContext.RouteData.Values["categoryId"].ToString());
    }


    //current manufacturer ID
    int currentManufacturerId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("manufacturer", StringComparison.InvariantCultureIgnoreCase))
    {
        currentManufacturerId = Convert.ToInt32(Url.RequestContext.RouteData.Values["manufacturerId"].ToString());
    }


    //current product ID
    int currentProductId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("product", StringComparison.InvariantCultureIgnoreCase))
    {
        currentProductId = Convert.ToInt32(Url.RequestContext.RouteData.Values["productId"].ToString());
    }
}




<div class="container">
    <div class="row">
        <div class="col-lg-12">
            @Html.Widget("home_page_top")
        </div>
    
    </div>
</div>
<div class="container">
    <div class="row">
        
        <div class="col-lg-3">
            @if (IsSectionDefined("left"))
            {
                @RenderSection("left")
            }
            else
            {
                @Html.Widget("left_side_column_before")
                @Html.Action("CategoryNavigation", "Catalog", new { currentCategoryId = currentCategoryId, currentProductId = currentProductId })
                @Html.Widget("left_side_column_after_category_navigation")
                @Html.Action("ManufacturerNavigation", "Catalog", new { currentManufacturerId = currentManufacturerId })
                @Html.Action("PopularProductTags", "Catalog")
                @Html.Action("PollBlock", "Poll", new { systemKeyword = "LeftColumnPoll" })
                @Html.Widget("left_side_column_after")
            }
        </div>
        <div class="col-lg-6">
            @Html.Widget("main_column_before")
            @RenderBody()
            @Html.Widget("main_column_after")
        </div>
        <div class="col-lg-3">
            @if (IsSectionDefined("right"))
            {
                @RenderSection("right")
            }
            else
            {
                @Html.Widget("right_side_column_before")
                @*@Html.Action("NewsletterBox", "Newsletter")*@
                @Html.Action("RecentlyViewedProductsBlock", "Product", new { productThumbPictureSize = 32 })           
        @*@Html.Action("InfoBlock", "Common")*@    
                @Html.Action("PollBlock", "Poll", new { systemKeyword = "RightColumnPoll" })
                @Html.Widget("right_side_column_after")
            }
        </div>        
    </div>
</div>

